import Vue from 'vue';
import App from './App.vue';
import router from './router';
import store from './store';

//公共css文件
import '@/assets/css/common.css';
//字体图标css文件
import '@/assets/css/iconfont.css';
//淘宝无线适配
import '@/assets/js/flexible';

//ly-tab插件
import LyTab from 'ly-tab';
Vue.use(LyTab);

//全局引入mint-ui
// import MintUI from 'mint-ui';
// import 'mint-ui/lib/style.css';
// Vue.use(MintUI);

//按需引入vant
// import Vant from 'vant';
// import 'vant/lib/index.css';
import {
    Toast,
    Loading,
    Checkbox,
    Stepper,
    PullRefresh,
    Tab,
    Tabs,
    Swipe,
    SwipeItem,
    RadioGroup,
    Radio,
    AddressEdit,
    Lazyload,
    Icon,
    Image as VanImage,
} from 'vant';
Vue.use(Loading)
    .use(Checkbox)
    .use(Stepper)
    .use(PullRefresh)
    .use(Tab)
    .use(Tabs)
    .use(Swipe)
    .use(SwipeItem)
    .use(Toast)
    .use(RadioGroup)
    .use(Radio)
    .use(AddressEdit)
    .use(Lazyload)
    .use(Icon)
    .use(VanImage);
Toast.setDefaultOptions({ duration: 1000 });
import fastClick from 'fastclick';
fastClick.attach(document.body);

Vue.config.productionTip = false;

new Vue({
    router,
    store,
    render: (h) => h(App),
    beforeCreate() {
        Vue.prototype.$bus = this; //安装全局事件总线
    },
}).$mount('#app');
